#!/bin/bash
set -e
set -x
MYDIR="${0%/*}"
cd "$MYDIR/.."
source "recipes/common.sh"


# RECIPE START efibootmgr
# depends: cross-pkg-config
# depends: efivar
# depends: popt

rm -rf build/efibootmgr
cp -a efibootmgr build/

# Thanks God efibootmgr does NOT use autocrap
env \
	CROSS_COMPILE="${TARGET}-" \
	LD="${TARGET}-ld" \
	HOSTCC="gcc" \
	PREFIX="$prefix" \
	LIBDIR="$prefix/${target_libdir}" \
	EFIDIR='altlinux' \
make -j${JOBS} -C build/efibootmgr \
	all install DESTDIR="$stage"

rm -rf build/efibootmgr

# RECIPE END efibootmgr
